#include<iostream>
#include<cstdio>
#define N 10
#define mod 1000000007
using namespace std;
int read()
{
	char c=0;
	int sum=0;
	while (c<'0'||c>'9') c=getchar();
	while ('0'<=c&&c<='9') sum=sum*10+c-'0',c=getchar();
	return sum;
}
void Adder(int &x,int d)
{
	x=x+d>=mod?x+d-mod:x+d;
	return;
}
int n,m,x,res,ans,dp[N+1][1<<N][1<<N];
string y;
int main()
{
	freopen("pearl.in","r",stdin);
	freopen("pearl.ans","w",stdout);
	n=read(),m=read(),x=read(),cin>>y;
	for (int i=0;i<m;++i)
		if (y[i]=='1')
			res|=(1<<i);
	dp[0][0][0]=1;
	for (int i=1;i<=n;++i)
		for (int j=0;j<(1<<m);++j)
			for (int k=0;k<(1<<m);++k)
				for (int t=0;t<(1<<m);++t)
				{
					if (x==i&&t!=res) continue;
					Adder(dp[i][j^((k*t)%(1<<m))][t],dp[i-1][j][k]);
				}
	for (int i=0;i<(1<<m);++i)
		for (int j=0;j<(1<<m);++j)
			Adder(ans,1ll*dp[n][i][j]*i%mod);
	printf("%d\n",ans);
	return 0;
}
